package it.test.java.decoratord.student;

import java.math.BigDecimal;

/**
 * @Copyright 纳新智能科技有限公司
 * @Author Liky
 * @Date 2023/9/27
 */
public class LearningDecorator implements ILearning{

    private ILearning learning;

    public LearningDecorator(ILearning learning) {
        this.learning = learning;
    }

    @Override
    public BigDecimal improveScore(Student student) {
        BigDecimal score = BigDecimal.ZERO;
        if(null != student.getScore()){
            score = learning.improveScore(student);
        }
        return score;
    }
}
